package service

import (
	"choujiang/common/db"
)

const (
	CONINS_EARN_COLLECT   = "BoxCollection::coinsearn"
	CONINS_EXPEND_COLLECT = "BoxCollection::coinsexpend"
)

/**
 获取金币记录
 */
func GetCoinsLog(userId, aType int64, pageNo, pageSize int) []db.CoinsLog {
	coinsColl := ""
	if aType == 1 { //收益
		coinsColl = CONINS_EARN_COLLECT
	} else { //支出
		coinsColl = CONINS_EXPEND_COLLECT
	}
	log := db.Mgo.GetCoinsLog(userId, coinsColl, pageNo, pageSize)
	return log
}
